<!--
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<div class="ddp-ui-contents-list" *ngIf="roleList">
  <!-- 상단 옵션 영역 -->
  <div class="ddp-wrap-option">
    <div class="ddp-ui-option ddp-optiontype ddp-clear">
      <div class="ddp-ui-rightoption">
        <span class="ddp-data-total ddp-only">{{'msg.permission.ui.num.lists' | translate  : { value : roleList.length } }}</span>
      </div>
    </div>
  </div>
  <!-- // 상단 옵션 영역 -->

  <!-- 목록 영역 -->
  <table class="ddp-table-form ddp-table-type3">
    <colgroup>
      <col width="15%">
      <col width="*">
      <col width="15%">
      <col width="15%">
    </colgroup>
    <thead>
      <tr>
        <th> {{'msg.comm.menu.admin.user.permission' | translate}} </th>
        <th> {{'msg.comm.ui.description' | translate}} </th>
        <th> {{'msg.space.ui.member' | translate}} </th>
        <th> {{'msg.space.ui.group' | translate}} </th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let role of roleList" (click)="moveToRoleDetail(role)">
        <td>
          <div class="ddp-txt-long">{{getRoleName(role.name)}}</div>
        </td>
        <td>
          <div class="ddp-txt-long">{{getRoleDesc(role.name)}}</div>
        </td>
        <td>{{role.userCount}}</td>
        <td>{{role.groupCount}}</td>
      </tr>
    </tbody>
  </table>
  <!-- // 목록 영역 -->

</div>
